package com.naiterui.ehp.bs.doctor.domain;

import static javax.persistence.GenerationType.IDENTITY;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import lombok.Data;

/**
 * @author guoyongxiang
 * @date 2020/2/16 14:48
 * @since 1.0.0
 */
@Data
@Entity
@Table(name = "record_work_contract")
public class RecordWorkContract implements Serializable {

    private static final long serialVersionUID = -6576866238161315902L;

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = IDENTITY)
    @Column(name = "id", unique = true, nullable = false)
    private Long id;

    /**
     * 用户编号
     */
    @Column(name = "user_code", nullable = false)
    private String userCode;

    /**
     * 文件相对路径
     */
    @Column(name = "url")
    private String url;

    /**
     * 创建时间
     */
    @Column(name = "created_at")
    private Date createdAt;

    /**
     * 创建人
     */
    @Column(name = "created_by")
    private String createdBy;

    /**
     * 修改时间
     */
    @Column(name = "changed_at")
    private Date changedAt;

    /**
     * 修改人
     */
    @Column(name = "changed_by")
    private String changedBy;

    /**
     * 乐观锁
     */
    @Version
    private Integer version;
}
